home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 017 (1988-06)(Swedish User Group of Amiga)(SE)(PD)[m doscopy][WB].zip / Camelot 017 (1988-06)(Swedish User Group of Amiga)(SE)(PD)[m doscopy][WB].adf / JoBS / JOBS.DOC < prev    next >
Text File  |  1988-06-08  |  15KB  |  352 lines

  1. CB N EG
  2.                         /*** JoBS program ***/
  3.  
  4.  
  5. This is ShareWare:  use it, copy it, or send it to another BBS.
  6.  
  7. ----------------------------------------------------------------------
  8. WHAT IS JoBS ?
  9.  
  10. The program provides instant access to various WorkBench and CLI
  11. commands by simply selecting command gadgets.  The user can define
  12. upto 280 commands and assign them to command gadgets.  JoBS also
  13. provides the built-in capabilities of several CLI commands. (CD,
  14. LIST, COPY, RENAME, MAKEDIR, DELETE, and some others).
  15.  
  16. JoBS allows the user to invoke most CLI programs or WB commands by
  17. simply selecting the displayed program name with the mouse then
  18. selecting the "Run" gadget.
  19.  
  20. Moreover, filenames can be selected as input or output for other
  21. programs.  For example, selecting files to edit, files to arc,
  22. IFF-pictures to display, music to play, basic programs to run,
  23. spreadsheets or databases to open, games to play, etc...
  24.  
  25. ----------------------------------------------------------------------
  26. HOW TO INSTALL JoBS ?
  27.  
  28. (1)  Automatic-Startup Method (Recommended for 512K or more)
  29.  
  30.      Copy JoBS c:
  31.      Copy JoBS.def s:
  32.  
  33.      Your-Favorite-Editor  s:startup-sequence
  34.      (add the following commands before or instead of LoadWB)
  35.           run JoBS s:JoBS.Def
  36.           wait 2
  37.      (remove the following command)
  38.           EndCLI
  39.  
  40.      Reboot (Ctl-Amiga-Amiga)
  41.  
  42. Now, you get JoBS every time you power-on, the CLI window will stay
  43. active, and you can drag the CLI resizing gadget left to expose the
  44. Workbench screen, if you really need it.
  45.  
  46.  
  47. (2)  CLI Method - Option A
  48.  
  49.      Copy JoBS c:
  50.      Copy JoBS.def s:
  51.      Run JoBS
  52.  
  53.  
  54. (3)  CLI Method - Option B
  55.  
  56.      Copy JoBS and JoBS.Def to the same directory on any disk.
  57.      Change to that directory (eg:  CD df1:JoBSdir )
  58.      Run JoBS
  59.  
  60.  
  61. (4)  CLI Method - Option C
  62.  
  63.      Copy JoBS and JoBS.Def to the same directory on any disk.
  64.      Run df1:JoBSdir/JoBS df1:JoBSdir/JoBS.Def
  65.  
  66.  
  67. (5)  Workbench Method (Not recommended at all)
  68.  
  69.      Copy JoBS, JoBS.Def, and JoBS.info to the same directory on any disk.
  70.      Double-click the JoBS icon.
  71.  
  72. JoBS.info is not required unless you use this method.  JoBS uses the
  73. CLI window for some user-defined commands like DME, so this
  74. method will limit JoBS capabilities.
  75.  
  76. ----------------------------------------------------------------------
  77. JoBS BUILT-IN FUNCTIONS
  78.  
  79. The "Dir>" text field shows name of the current directory.  When the
  80. text in this gadget is modified and entered, JoBS will try to change
  81. to that directory and display those filenames.
  82.  
  83. The "Pat>" text field is used to display filenames given some pattern
  84. and wildcard characters.  The '*' matches anything and '?' matches any
  85. single character.  For example, to show all icon files select the
  86. "Pat>" text field and enter "*.info".  Pattern requests do not change
  87. the current directory and accumluate in the file list.  One possible
  88. application for this allows comparing the filenames for two or more
  89. directories.  File-sizes and file-times are not displayed so that the
  90. full directory-path and file name can be displayed.
  91.  
  92. The "Use>" text field is a general purpose input gadget, and may be
  93. used to enter a new sub-directory name, or an entire CLI command.
  94.  
  95. Small gadgets with the names of frequently used disk-drives and other
  96. ram-disks are available for both "Dir>" and "Use>", these gadgets are
  97. user definable within the JoBS.def file.
  98.  
  99. The filenames in the current directory are displayed on the left side
  100. of the screen.  There are three ways to scroll the filenames:  (1) use
  101. the sliding gadget for scrolling large jumps , (2) use the up and down
  102. gadgets to scroll 1 filename at a time, or (3) use the up and down
  103. arrow keys that scroll 3 filenames at a time.
  104.  
  105. The window of filenames also shows the number of days since the file
  106. was modified, the time it was modified, and the file size.
  107.  
  108. To the right of the filenames, the column of small integer numbers
  109. will indicate how many days since the file has been copied or
  110. modified.  This is great if you have a clock or always set the time.
  111. I picked this format because its concise, easy and fast to compute.
  112.  
  113. The next column is the time of day that each file was copied or
  114. modified, as hours:minutes.  This is handy for your current session.
  115. Also, directory names will show the last time that any file within
  116. the directory was modified.
  117.  
  118. The last column is the size of the file.  The units are in "Bytes" or
  119. "Blocks" depending on the label of the corresponding command gadget in
  120. the top-right group.  The small box at the bottom of this column shows
  121. the total size of all files selected.  This is handy in several ways:
  122. (1) see if the selected files will fit on another disk before copying,
  123. (2) see the progress of JoBS as files are processed the filenames are
  124. deselected and the total size of remaining files reduce to zero,
  125. (3) sometimes, especially when deleting files it is nice to know that
  126. the filename selected is the only file selected - the file size should
  127. match the total filesize displayed.
  128.  
  129. The top-right group of gadgets includes another one called "Sort" that
  130. will sort the filename alphabetically, or by time, or by file size.
  131. The time sort will show most recently changed/copied files first.
  132. The size sort will show the largest files (usually programs) first.
  133.  
  134. The command gadget "Confirm" or "Bypass" acts like a switch.  Either
  135. allowing confirmation before a command is executed or bypassing.
  136. This command can also be invoked by pressing the right mouse button.
  137. "Bypass" is much faster, but be careful which gadget you select !!!
  138.  
  139. To enter into a directory in the filename list, just select the
  140. directory name.  To back-out of a directory select "Parent".
  141.  
  142. "All" will toggle select/deselect all filenames.
  143.  
  144. "Select" will copy a selected filename to the "Use>" field, or copy
  145. the current directory name if there isn't a filename selected.
  146.  
  147. "Clear" will first deselect any selected filenames. "Clear" again
  148. will erase any text from the "Use>" field.
  149.  
  150. Tasks can be run as a "SubTask", or invoked as "OneTask" that run
  151. without inter-task contention by using this top-right command gadget.
  152. "SubTask" simply runs each request as a separate task.  "OneTask"
  153. stacks up the requests one-after-the-other; more on this later.
  154.  
  155. Files can be copied from the current directory by selecting the
  156. filenames and entering the name of some other disk or directory into
  157. the "Use>" field, then select "Copy" command from the top-right group.
  158. Note, this built-in command will not copy and rename a file back into
  159. the current directory, like AmigaDOS COPY.  For that, simply pick the
  160. user command gadget that invokes the AmigaDOS COPY command instead.
  161.  
  162. A filename can be renamed by selecting the filename and entering the
  163. new filename into the "Use>" field, then select the "Rename" command.
  164. There is no real difference between this built-in command and the
  165. corresponding AmigaDOS RENAME user command.
  166.  
  167. Selected files can be deleted using the "Delete" command gadget.
  168. The "Use>" field can alternately be used for a filename to delete.
  169.  
  170. "Del-Dir" removes the current empty directory.  If the directory files
  171. need to be erased select "All" then "Delete".
  172.  
  173. "MakeDir" creates a new directory within the current directory using
  174. the name given in the "Use>" field.
  175.  
  176. JoBS displays 40 command gadgets on the right side of the screen.
  177. Each of the bottom 28 command gadgets can scroll through 10 different
  178. user command definitions.  There are two ways to scroll the user
  179. command gadgets:  (1) use the up and down gadgets to scroll one page
  180. at a time, or (2) press a number on the keyboard (1=page-1,
  181. 2=page-2,...  9=page-9, 0=page-10).
  182.  
  183. ---------------------------------------------------------------------
  184. JoBS USER COMMANDS
  185.  
  186. There is one main caveat for all prospective user commands which only
  187. involves those programs that use a CLI window for some additional user
  188. input.  Programs (like DIR OPT I) that will prompt the user for
  189. various keyboard interactions will not work the same.  Most programs
  190. use their own windows for user interaction which works fine.
  191.  
  192. A simple work-around exists for most CLI window input(s).  You can
  193. avoid the CLI window input problem by redirecting user input to come
  194. from a <file instead.  For example:  user response to enter y/n in
  195. order to confirm a screen dump, or some script of several user
  196. responses can be saved in a file and defined within the user command
  197. gadget (see JoBS.Def for details).
  198.  
  199. The "Use>CLI" user command gadget simply invokes whatever command
  200. statement is currently given in the "Use>" field.  This has some
  201. advantanges over the straight CLI window, because statements in the
  202. "Use>" field can be modified or reused, and misspellings can be easily
  203. corrected without retyping, also filenames can be copied to "Use>".
  204.  
  205. To run a program in the current directory, just select the program
  206. name then select the "Run" user command gadget.
  207.  
  208. The "Parms" command gadget is used to invoke a command in the "Use>"
  209. field and pass the selected filenames as parameters.  This is one of
  210. the most general purpose command gadgets.  Put the name (including
  211. path if required) of some program into the "Use>" field (like:
  212. AmigaBasic, MaxiPlan, DME, Blitz, Execute, uShow, UnArc, Make, MFF,
  213. Scribble!,...you get the idea).  Then select any filename(s) you want
  214. to process with the "Use>" command.  If you want to select more than
  215. one filename, first check the state of the "SubTask"/"OneTask" gadget.
  216. "OneTask" will stack-up the process requests, one after the other.
  217. "SubTask" uses multi-tasking do everything pseudo-simultaneously.
  218.  
  219. "Execute" will execute a selected command (aka Script) filename.
  220.  
  221. ---------------------------------------------------------------------
  222. HOW TO CUSTOMIZE JoBS USER COMMANDS ?
  223.  
  224. JoBS.def defines all 280 user command gadgets, descriptions for each
  225. of the 10 pages of user commands, and the default storage devices.
  226.  
  227. JoBS automatically reads JoBS.def when the program starts.
  228.  
  229. Even after JoBS has started, the user can select a definition file
  230. then the "Define" command gadget.  All the gadgets will be redefined.
  231.  
  232. Look at the sample JoBS.def file.  The file should have 291 records.
  233.  
  234. The user can add new commands or redefine any of the command gadgets.
  235.  
  236. The first record defines the 5 storage devices.  Each device name has
  237. upto 4 characters.  These names are used to control "Dir>" & "Use>".
  238.    vd0: df0: df1: df2: ram:
  239.  
  240. The next 10 records of the JoBS.def file are short descriptions for
  241. each page of user command gadgets.  Each page contains 28 gadget
  242. definitions so its useful to group them in some way.  The descriptions
  243. are displayed in the message window when scrolling command gadgets.
  244.  
  245. The next 280 records define each user command gadget.
  246.  
  247. There are basically 3 fields in each record:
  248. (1) the gadget label, (2) the controls, (3) the format statement
  249.  
  250. The gadget label can be anything, upto 7 chars, no imbedded blanks.
  251.  
  252. Blank space is used to separate each field.
  253.  
  254. The controls field has upto 3 control characters defined as follows:
  255.  
  256. You have a two choices for the first control character:
  257.    (1) '?' means confirm the user command before execution
  258.    (2) '-' means dash right into the command without confirmation
  259.    Note: your choice of "Confirm" or "Bypass" will override.
  260.  
  261. You have three choices for the second control character:
  262.    (1) '!' means that if several filenames are selected as "OneTask"
  263.    the sequence will run uninterrupted by mouse-button selections.
  264.    (2) '-' means stop the current process by using the mouse-button.
  265.    (3) ' ' means take the default values for the second and third
  266.    control characters.
  267.  
  268. You have three choices for the third control character:
  269.    (1) ':' means that after a command executes in "OneTask" mode,
  270.    refresh the directory list to see any new or changed filenames.
  271.    (2) '-' means after the command do not refresh directory list.
  272.    (3) ' ' means take the default value '-'
  273.  
  274. The format statement field a little more complex to explain, but its
  275. really easy to use.
  276.  
  277. The format can be upto 72-characters with imbedded blanks.
  278.  
  279. The characters "%s" are used to substitute parameters:
  280.   "%s" transfers all characters as required
  281.   "%0.0s" transfers zero characters (used to ignore parameters)
  282.   "%4.4s" transfers exactly four characters (ie. "df1:")
  283.  
  284. This syntax is used in the "C" language for building a text string
  285. from several variables.  For those who care:
  286.  
  287. /********************************************************************/
  288. sprintf(command,&But_cmd[gadgid][0],Task,filename,Use_buf,filename,Use_buf);
  289. if(But_req[gadgid][0]=='?')
  290. {
  291.    sprintf(Prompt_buf,"Confirm Control Button:");
  292.    sprintf(Yes_buf,"%s",command);
  293.    sprintf(No_buf,"Abort !");
  294.    if(!AutoRequest(G_window,&Request_text,&Yes_text,&No_text,NULL,NULL,600,48))
  295.       goto quit;
  296. }
  297. Execute(command,0,0);
  298. /********************************************************************/
  299.  
  300. command  = what gets executed
  301. Task     = "Run" in "SubTask" mode, or "   " in "OneTask" mode
  302. filename = selected filename, or null string if no files are selected
  303. Use_buf  = text in "Use>" field
  304. But_cmd  = the format statement that we are talking about
  305.  
  306. The first "%s" will substitute the "OneTask" or "SubTask" mode.
  307.  
  308. The second "%s" will substitute a selected filename, or if no
  309. filenames are selected then the "Use>" text field will be substituted.
  310.  
  311. The third "%s" is only used when you want to capture both a filename
  312. and the "Use>" field.
  313.  
  314. The fourth "%s" is only used when you need the "Use>" field first then
  315. the selected filename.  In this case you will normally have the second
  316. "%s" as "%0.0s" to ignore the first time the filename is referenced.
  317.  
  318. I have no idea why you might want five "%s", but you can do it.
  319.  
  320. For filenames with imbedded blanks, don't forget to use quotes around %s,
  321. or better yet rename the file (for example: "MaxiPlan-Program").
  322.  
  323. For examples see:  JoBS.def
  324.  
  325. ---------------------------------------------------------------------
  326. CONCLUSION
  327.  
  328. This program is what you make of it.  You will find methods and
  329. techniques that simplify a wide range of tasks.  For example in
  330. downloading Arc files:  select the filename.arc, select "Select",
  331. remove .arc in "Use>", select "MakeDir", select "Rename", select
  332. the new directory name to make it current, select the arc file,
  333. and select the "UnArc" gadget.  Yes, this sequence can be written
  334. as an AmigaDOS script, but for ad-hoc work and flexible user
  335. definable commands, I think JoBS beats straight CLI and WB.
  336.  
  337. After many months developing this program, I use it from only
  338. one (customized) workbench disk to run all my Amiga applications.
  339. I don't LoadWB if I can help it, and delete #?.info to save disk$.
  340.  
  341. JoBS-5 version will be even better!
  342.  
  343. Please write to me if you have any questions, new user command
  344. definitions or ideas for enhancements.  Gratuities are always
  345. appreciated.
  346.  
  347.  
  348.                         John Sawaya
  349.                         18 Rocky Glen Road
  350.                         Oxford, PA 19363
  351.  
  352.